x=0:0.1:1;
y=exp(x);
fid=fopen('myfile.txt','w');
fprintf(fid,'%6.2f %12.8f\n',[x;y]);
fclose(fid);
type myfile.txt
fid=fopen('myfile.txt','a');
fprintf(fid,'%d\t%d\t%d\n',[1,2,3;4,5,6;7,8,9]);
fclose(fid);
type myfile.txt
fid=fopen('myfile.txt','rt');
[A,count]=fscanf(fid,'%f %f',[2,11])
